package ooexercise03;
/*
public class Chick extends Animal{
    Chick(String name,int age,String colour){
        super(name,age,colour);
    }

    public void eat(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在吃小米");
    }

    void layEgg(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在下蛋");
    }

    public void swim(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在游泳");
    }
}

 */
public class Chick extends Animal{
    Chick(String name,int age,String colour){
        super(name,age,colour);
    }

    void eat(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在吃小米");
    }

    void layEgg(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在下蛋");
    }
    public void swim(){
        System.out.println(colour+"色的"+age+"岁小鸡"+name+"在游泳");
    }
}